package com.itheima.advantagesup.properties;

import com.itheima.advantagesup.config.AliOSSConfigure;
import com.itheima.advantagesup.utils.AliOssUtil;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author iTaotao
 * @version 1.0.0
 * @ClassName AliOSSProperties.java
 * @Description 阿里配置
 * @createTime 2023年07月29日 10:43:00
 */
@Configuration
public class AliOSSProperties {
    @Bean
   public AliOssUtil aliOSSUtils(AliOSSConfigure aliOSSConfigure){
        return new AliOssUtil(aliOSSConfigure.getEndpoint(),
                aliOSSConfigure.getAccessKeyId(),
                aliOSSConfigure.getAccessKeySecret(),
                aliOSSConfigure.getBucketName());

    }
}
